/**
 * 医疗服务质询初始化模块，提供医疗服务编辑页面初始化组件功能
 * 
 * @Date: 2016-1-25
 * @author: Jackson wang
 * @version: 1.0
 * @since: 1.0
 */

define(["jquery","sysmanMain","msgServ"],
		function($,sysmanMain,msgServ) {
			
		'use strict';
		var _loadUrl = '/param/query/reloadCache.action'
		
		var public_method ={
			
			
			/**
			 * @param _options.record
			 */
			buttonExtends:function(){
				return {'刷新缓存':private_method.reloadParam}
			}
			
		}
		
		var private_method = {
			reloadParam:function(e){
				if(window.console){
					console.info('param moudle loaded...')
				}
				var _rootpath = '/'+sysmanMain.getRootPath()
				$.ajax({
					url:_rootpath + _loadUrl,					
					success:function(data){
						msgServ.Msgslide('缓存刷新成功');
						if(e && e.currentTarget){
							$(e.currentTarget).linkbutton('enable')
						}
					}
					,
					error:function(){
						msgServ.Msgslide('缓存刷新失败');
						if(e && e.currentTarget){
						$(e.currentTarget).linkbutton('enable')
					}
					}
				})
				
			}
				
		}
		
		
		
		return public_method;
			
})